package org.liveboardgames.agricola.business.action.overrideaction;

import org.liveboardgames.agricola.domain.action.Action;
import org.liveboardgames.agricola.domain.common.Target;
import org.liveboardgames.agricola.model.enums.ActionOutputEnum;

public class ActionOverrideFactory {

  public static ActionOverride getActionOverride(Action action, Target target) {
    ActionOverride actionOverride = null;

    String actionOutput = action.getActionOutput();
    if (ActionOutputEnum.RENOVATION_TO_CLAY.equals(actionOutput)) {
      actionOverride = new RenovationToClayActionOverride(action, target);
    }
    else if (ActionOutputEnum.RENOVATION_TO_STONE.equals(actionOutput)) {
      actionOverride = new RenovationToStoneActionOverride(action, target);
    }

    return actionOverride;
  }

}
